1. Field
The disclosure is related to an image processing method and an image processing system using a regionalized structure.
2. Description of Related Art
Modern image processing technique adopts a plurality of basic image processing units, such as a smooth processing unit, a de-noise processing unit, a edge detection unit, a corner detection unit, a straight line detection unit, and a curve line detection unit, to optimize original images or obtain effective image characteristics. However, the calculations of these basic units are all based on a point structure, in which neighboring pixels are used to accomplish calculation requirement of each kind of image processing procedure. When performing a specific basic unit, a result corresponding to each pixel is generated according to the neighboring pixels around the currently processed pixel, and the calculation results of the pixels are gathered as a processed result.
FIG. 1(a) and FIG. 1(b) are examples of conventional smooth/de-noise processing using a point structure. Wherein, FIG. 1(a) illustrates that when performing a smooth/de-noise processing on an original image 100, a mask 102 with a size of 3*3 is moved on an image through an up-toward-down and left-toward-right method. In the calculation of each pixel, the values of the mask 102 are respectively multiplied by the pixel values of the pixels in the corresponding location and then the calculated products are added together, which is referred to as a convolution calculation. The convolution is further divided by a sum of values of the mask 102, so as to obtain an image 110 processed by the smooth/de-noise processing. For example, to perform the smooth/de-noise processing on the pixel 104 of original image 100, the pixel itself and its eight neighboring pixels are respectively multiplied by the values of the mask 102, the products are added together and then divided by a sum of values of the mask 102, which is (1*65+1*66+1*65+1*67+1*90+1*68+1*67+1*66+1*65)/9. Finally, the obtained pixel value of 69 is used as the processed result of pixel 104 after the smooth/de-noise processing. However, after the smooth processing is accomplished, the characteristics of the edge of the image are blurred.
FIG. 2(a) and FIG. 2(e) are examples of conventional edge detection using a point structure. Wherein, FIG. 2(a) is an original image 200 having a size of 8*8. FIG. 2(b) and FIG. 2(c) are respectively a mask 202 for detecting a horizontal edge and a mask 204 for detecting a vertical edge. FIG. 2(d) and FIG. 2(e) are results of the horizontal detection and vertical detection performed on the original image 200, respectively. To determine an edge pixel, the conventional edge detecting method also moves the horizontal detection mask 202 and the vertical detection mask 204 on the original image 200 to obtain convolution results as shown in FIG. 2(d) and FIG. 2(e), and finally determines the edge according a gradient of the pixels in the processed image. Although the horizontal and vertical edge pixels can be detected successfully through aforesaid edge detecting method, the corresponding region of each edge pixel is still unknown.
FIG. 3(a) and FIG. 3(e) are examples of conventional straight line detection using a point structure. Wherein, FIG. 3(a) represents a point (x, y) in a two-dimensional space. The point (x,y) can be further transformed into a corresponding w value through following coordinate-transforming formula.w=x cos(φ)+y sin(φ)  (1)
Wherein, since x and y are already known, the values of w corresponding to each of different variables φ (from 0 degree to 180 degrees) can be obtained, so as to generate an accumulated matrix as shown in FIG. 3(b). In the x-y space, each point can be transformed into a curve line in the w-φ space. The number of curve lines that cross by an intersection point having most curve lines crossed by represents a number of straight lines in the x-y space. Although the number of straight lines can be obtained through aforesaid straight line detecting method, the region corresponding to each of the straight lines is still unknown.
Therefore, the conventional image processing technique based on a point structure has following major defects.
First, it is unable to understand the pixel property of an image, such that, in practice, the calculation has to be performed on all the pixels so as to obtain a result. However, if the characteristic of each pixel (e.g. whether the pixel is a noise pixel or an edge point) can be obtained before the calculation, the edge detection or the corner detection can be limited to be performed on these pixels, such that the cost of calculation can be reduced.
Second, it is unable to obtain differences between the properties of the pixel and its neighboring pixels, such that all the neighboring pixels have to be used in the calculation. However, if the differences between the properties of each pixel and its neighboring pixels (e.g. whether the neighboring pixel is a noise pixel) can be obtained before the calculation, the neighboring pixels having different properties can be ignored, such that the errors can be reduced.
Third, additional steps are required to correct the image characteristics changed due to the basic calculation. For example, for detecting a straight line in an image, the conventional image processing technique has to use the smooth processing unit and de-noise processing unit to remove the noise. As a result, a number of edge pixels of the image is increased. In other words, when executing the edge detection unit, a thick line is expected to be detected. At this time, an additional thinning processing unit has to be executed, so as to obtain a skeleton of the thick line. Then, the straight line detection unit can be used to detect the straight line in the image.
Fourth, multiple basic image processing units cannot be effectively integrated and executed in parallel. For example, for performing three basic image processing units including a straight line detection unit, a curve line detection unit and a corner detection unit, commonly used information, excluding the pixel information after smooth processing and edge detection, has to be calculated separately. In other words, these detections cannot be processed in parallel to reduce unnecessary calculation.
Fifth, the image after being processed by the basic units cannot provide additional information for the succeeding advanced image processing units to reference. For example, the edge detection unit can only detect the edge pixels in an image, but is not able to know which edge pixels belong to the same region (object). Therefore, no regionalized information can be provided for the succeeding advanced image processing units like image dividing unit or graph recognition unit to effectively performing processing procedures.
It is known from the above that the conventional image processing technique based on a point structure still has various defects. How to simultaneously execute basic image processing units so as to reduce unnecessary calculation and provide more information for the succeeding advanced image processing units has become a major issue in the image processing field.